gh-87904: Document curses classes#151643
Conversation
Add docstrings for the curses.window, curses.error, curses.panel.panel and curses.panel.error classes. Document the panel class and its error exception in curses.panel.rst, using the real lowercase panel name.
Documentation build overview
29 files changed ·
|
|
@encukou, are these IDs case-sensitive? |
| c-api/typeobj.html: c.Py_tp_bases | ||
|
|
||
| # curses.panel.panel is the correct class name. | ||
| library/curses.panel.html: curses.panel.Panel.above |
There was a problem hiding this comment.
I think it would be better to preserve them, like we do elsewhere by injecting some anchors:
.. raw:: html
<!-- Keep the old URL fragments working (see gh-89554) -->
<span id='thread.lock.acquire'></span>
<span id='thread.lock.release'></span>
<span id='thread.lock.locked'></span>|
Alternative solution -- rename |
|
I think it is better to resolve such issues on the HTML server side, if possible. Or add a special Sphynx extension. This PR is needed for #151748. |
Server redirects can be added to https://github.com/python/psf-salt/blob/main/salt/docs/config/nginx.docs-redirects.conf. Hugo proposed a Sphinx extension above, it "redirects" by creating files at the locations pointing to the new location. |
Here: #151656 (comment) A benefit of using the Sphinx extension is that each branch is self-contained, so also works locally and for third parties (who of course aren't hosting on PSF infra). |
Instead of excluding the renamed curses.panel.Panel.* IDs from the check-html-ids.py check, keep the old URL fragments working by injecting <span> anchors, as proposed by Stan Ulbrych and done elsewhere (pythongh-89554). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
In this case, redirection cannot help, we need to add anchors. The question is only whether to add a raw html, invisible |
|
Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14, 3.15. |
|
Sorry, @serhiy-storchaka, I could not cleanly backport this to |
|
GH-152048 is a backport of this pull request to the 3.15 branch. |
Add docstrings for the curses.window, curses.error, curses.panel.panel and curses.panel.error classes. Document the panel class and its error exception in curses.panel.rst, using the real lowercase panel name. (cherry picked from commit 560ff8e) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add docstrings for the curses.window, curses.error, curses.panel.panel and curses.panel.error classes. Document the panel class and its error exception in curses.panel.rst, using the real lowercase panel name.